<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<%@ include file="/WEB-INF/views/include/easyui.jsp"%>

</head>
<body>
<div>
	<form id="mainform" action="${ctx}/employee/${action}" method="post">
	<table  class="formTable">
		<tr>
			<td width="35%" align="right">员工号：</td>
			<td width="65%">
				<input type="hidden" name="id" value="${employee.id }" />
				<input id="userCode" name="userCode" type="text" value="${employee.userCode }" class="easyui-validatebox"  data-options="width: 180,required:'required'" validType="length[0,10]"/>
			</td>
		</tr>
		<tr>
			<td align="right">CRM编号：</td>
			<td>
				<input id="jxId" name="jxId" type="text" value="${employee.jxId }" class="easyui-validatebox"  data-options="width: 180" validType="length[0,10]"/>
			</td>
		</tr>
		<tr>
			<td align="right">姓 名：</td>
			<td>
				<input id="userName" name="userName" type="text" value="${employee.userName }" class="easyui-validatebox"  data-options="width: 180,required:'required'" validType="length[0,5]"/>
			</td>
		</tr>
		<tr>
			<td align="right">手机号：</td>
			<td>
				<input id="telephone" name="telephone" type="text" value="${employee.telephone }" class="easyui-validatebox"  data-options="width: 180,required:'required'" validType="length[0,11]"/>
			</td>
		</tr>
		<tr>
			<td align="right">身份证号：</td>
			<td>
				<input id="cardNo" name="cardNo" type="text" value="${employee.cardNo }" class="easyui-validatebox"  data-options="width: 180,required:'required'" validType="length[0,18]"/>
			</td>
		</tr>
		<tr>
			<td align="right">营业部：</td>
			<td>
				<input id="userDept" name="userDept" type="text" value="${employee.userDept }" class="easyui-validatebox"  data-options="width: 180" validType="length[0,30]"/>
			</td>
		</tr>
		<tr>
			<td align="right">岗 位：</td>
			<td>
				<input id="post" name="post" type="text" value="${employee.post }" class="easyui-validatebox"  data-options="width: 180" validType="length[0,20]"/>
			</td>
		</tr>
		<tr>
			<td align="right">城 市：</td>
			<td>
				<input id="city" name="city" type="text" value="${employee.city }" class="easyui-validatebox"  data-options="width: 180" validType="length[0,20]"/>
			</td>
		</tr>
	</table>
	</form>
</div>
<script type="text/javascript">
var action="${action}";

if(action=='update'){
	$('#userCode').attr("readonly","true");
	//$('#jxId').attr("readonly","true");
	$('#userName').attr("readonly","true");
	$('#telephone').attr("readonly","true");
	$('#cardNo').attr("readonly","true");
}

$(function(){
	$('#mainform').form({    
	    onSubmit: function(){    
	    	var isValid = $(this).form('validate');
			return isValid;	// 返回false终止表单提交
	    },    
	    success:function(data){   
	    	successTip(data,dg,d);
	    }    
	}); 
});

</script>
</body>
</html>